2bbd84576249061b5a2d029122cf1e50dc5c726e
[motion-next.git] /
1 <md-dialog class="extractedReport-dialog" aria-label="New ExtractedReport">
2   <form name="extractedReportForm" class="md-inline-form" novalidate>
3     <md-toolbar class="md-accent md-hue-2">
4       <div
5         class="md-toolbar-tools"
6         layout="row"
7         layout-align="space-between center"
8       >
9         <span class="title">{{ vm.title | translate }}</span>
10         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
11           <md-icon
12             md-font-icon="icon-close"
13             aria-label="Close dialog"
14           ></md-icon>
15         </md-button>
16       </div>
17     </md-toolbar>
18
19     <md-dialog-content ms-scroll>
20       <div class="error-list">
21         <div
22           ng-repeat="error in vm.errors"
23           class="error"
24           layout="row"
25           layout-align="space-between center"
26         >
27           <div>
28             <span class="message">{{error.message}}</span>
29             <span class="type">({{error.type}})</span>
30           </div>
31           <md-button class="md-icon-button">
32             <md-icon
33               md-font-icon="icon-alert-box"
34               aria-label="alert error"
35               class="s16"
36             ></md-icon>
37           </md-button>
38         </div>
39       </div>
40       <md-input-container class="md-block">
41         <label translate="ANALYTICS.REPORTNAME">ReportName</label>
42         <input
43           type=""
44           name="name"
45           ng-model="vm.extractedReport.name"
46           ng-required="true"
47           autofocus
48         />
49
50         <div
51           ng-messages="extractedReportForm['name'].$error"
52           ng-show="extractedReportForm['name'].$touched"
53           role="alert"
54         >
55           <div ng-message="required">
56             <span translate="ANALYTICS.ERRORS.REPORTNAME_REQUIRED"
57               >ReportName field is required</span
58             >
59           </div>
60         </div>
61       </md-input-container>
62       <md-input-container class="md-block">
63         <label translate="ANALYTICS.NAME">Name</label>
64         <input
65           type=""
66           name="basename"
67           ng-model="vm.extractedReport.basename"
68           ng-required="true"
69         />
70
71         <div
72           ng-messages="extractedReportForm['basename'].$error"
73           ng-show="extractedReportForm['basename'].$touched"
74           role="alert"
75         >
76           <div ng-message="required">
77             <span translate="ANALYTICS.ERRORS.NAME_REQUIRED"
78               >Name field is required</span
79             >
80           </div>
81         </div>
82       </md-input-container>
83
84       <div class="error-list">
85         <div
86           ng-repeat="error in vm.errors"
87           class="error"
88           layout="row"
89           layout-align="space-between center"
90         >
91           <div>
92             <span class="message">{{error.message}}</span>
93             <span class="type">({{error.type}})</span>
94           </div>
95           <md-button class="md-icon-button">
96             <md-icon
97               md-font-icon="icon-alert-box"
98               aria-label="alert error"
99               class="s16"
100             ></md-icon>
101           </md-button>
102         </div>
103       </div>
104     </md-dialog-content>
105
106     <md-dialog-actions
107       layout="row"
108       layout-align="space-between center"
109       ng-if="!vm.crudPermissions.readOnly"
110     >
111       <div layout="row" layout-align="start center">
112         <md-button
113           type="submit"
114           ng-if="vm.crudPermissions.canEdit && !vm.newExtractedReport"
115           ng-click="vm.saveExtractedReport()"
116           class="send-button md-accent md-raised"
117           ng-disabled="extractedReportForm.$invalid || extractedReportForm.$pristine"
118           aria-label="SAVE"
119           translate="ANALYTICS.SAVE"
120           translate-attr-aria-label="ANALYTICS.SAVE"
121         >
122           SAVE
123         </md-button>
124
125         <md-button
126           type="submit"
127           ng-if="vm.crudPermissions.canEdit && vm.newExtractedReport"
128           ng-click="vm.addNewExtractedReport()"
129           class="send-button md-accent md-raised"
130           ng-disabled="extractedReportForm.$invalid"
131           aria-label="ADD"
132           translate="ANALYTICS.ADD_EXTRACTEDREPORT"
133           translate-attr-aria-label="ANALYTICS.ADD_EXTRACTEDREPORT"
134         >
135           ADD EXTRACTEDREPORT
136         </md-button>
137       </div>
138       <div layout="row">
139         <md-button
140           class="md-icon-button"
141           ng-if="vm.crudPermissions.canDelete && !vm.newExtractedReport"
142           ng-click="vm.deleteExtractedReport($event)"
143           aria-label="DELETE"
144           translate
145           translate-attr-aria-label="ANALYTICS.DELETE"
146         >
147           <md-icon md-font-icon="icon-delete"></md-icon>
148           <md-tooltip
149             ><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip
150           >
151         </md-button>
152       </div>
153     </md-dialog-actions>
154   </form>
155 </md-dialog>